namespace Maple.Branch.AuthServer.EfCoreConfigurations
{
    using AuditLogs.EfCoreConfigurations;
    using Features.EfCoreConfigurations;
    using Identity.EfCoreConfigurations;
    using IdentityServer.EfCoreConfigurations;
    using Microsoft.EntityFrameworkCore;
    using Permissions.EfCoreConfigurations;
    using Settings.EfCoreConfigurations;
    using Tenants.EfCoreConfigurations;
    using Volo.Abp.EntityFrameworkCore;

    public class AuthServerDbContext : AbpDbContext<AuthServerDbContext>
    {
        public AuthServerDbContext(DbContextOptions<AuthServerDbContext> options)
            : base(options)
        {
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            modelBuilder.ConfigureIdentity();
            modelBuilder.ConfigureIdentityServer();
            modelBuilder.ConfigureAuditLogs();
            modelBuilder.ConfigurePermissions();
            modelBuilder.ConfigureSettings();
            modelBuilder.ConfigureTenants();
            modelBuilder.ConfigureFeatures();
        }
    }
}
